package com.wjq.demo.feign;

import com.wjq.demo.feign.config.MyFeignConfig;
import com.wjq.demo.feign.dto.Params;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author wjq
 * @since 2022-09-30
 */
@FeignClient(name = "demo-nacos", configuration = MyFeignConfig.class, contextId = "demo-feign")
public interface DemoFeign {


    /**
     * say hello
     *
     * @return say hello
     */
    @GetMapping("/hello")
    String sayHello();

    @GetMapping("/{path}")
    String testPathVariable(@PathVariable("path") String path);

    @GetMapping("/testRequestBody")
    String testRequestBody(@RequestBody Params params);
}
